/**
 * 获得已选中和虚选中的节点
 */
getChecked = function(treeId, type, treeType) {
	var nodes = new Array();
	if (treeType == 'tree') {
		nodes = $('#' + treeId).tree('getChecked',
				[ 'checked', 'indeterminate' ]);
	} else if (treeType == 'comboTree') {
		nodes = $('#' + treeId).combotree('tree').tree('getSelected',
				[ 'checked', 'indeterminate' ]);
		if (nodes == null) {
			nodes = $('#' + treeId).combotree('tree').tree('getChecked',
					[ 'checked', 'indeterminate' ]);
		}
	}
	var s = '';
	if (type == 'id') {
		for (var i = 0; i < nodes.length; i++) {
			if (s != '')
				s += ',';
			s += nodes[i].id;
		}
	} else if (type == 'text') {
		for (var i = 0; i < nodes.length; i++) {
			if (s != '')
				s += ',';
			s += nodes[i].text;
		}
	}
	return s;
}
getChecked = function(treeId, type, treeType) {
	var nodes = new Array();
	if (treeType == 'tree') {
		nodes = $('#' + treeId).tree('getChecked',
				[ 'checked', 'indeterminate' ]);
	} else if (treeType == 'comboTree') {
		nodes = $('#' + treeId).combotree('tree').tree('getSelected',
				[ 'checked', 'indeterminate' ]);
		if (nodes == null) {
			nodes = $('#' + treeId).combotree('tree').tree('getChecked',
					[ 'checked', 'indeterminate' ]);
		}
	}
	var s = '';
	if (type == 'id') {
		for (var i = 0; i < nodes.length; i++) {
			if (s != '')
				s += ',';
			s += nodes[i].id;
		}
	} else if (type == 'text') {
		for (var i = 0; i < nodes.length; i++) {
			if (s != '')
				s += ',';
			s += nodes[i].text;
		}
	}
	return s;
}